package pearson.automation.forms.courseDetails;

import org.openqa.selenium.By;

import framework.BaseForm;
import framework.elements.Button;
import framework.elements.Label;
import framework.elements.Link;
/**
 * Form for opening Course Details and Collaborators
 *
 */
public class CourseSettings extends BaseForm {

    private static Label identifyer = new Label(By.xpath("//h2[text()='Settings']"), "Course Settings");

    /* Settings Buttons */
    private Link collaborators = new Link(By.linkText("Collaborators"), "Collaborators setting");
    private Link courseDetails = new Link(By.linkText("Course details"), "Course details");
    private Button close = new Button(By.linkText("Close"), "Close");

    public CourseSettings() {
    super(identifyer.getLocator(), identifyer.getName());
    }

    public CollaboratorsForm clickCollaborators() {
    collaborators.clickAndWait();
    return new CollaboratorsForm();
    }

    public CourseDetailsForm clickCourseDetails() {
    courseDetails.clickAndWait();
    return new CourseDetailsForm();
    }

    public CourseDetailsNotEditableForm clickCourseDetailsRO() {
    courseDetails.clickAndWait();
    return new CourseDetailsNotEditableForm();
    }
}
